/**
 * 
 */
package model;

/**
 * @author yuqi
 *
 */
public class BillDetail {
	private int id;
	private int bill_id;
	private String name;
	private double price;
	private int quatity;
	private double discount;
	private double subtotal;
	
	/**
	 * use to store the result of select from database
	 * @param id
	 * @param bill_id
	 * @param name
	 * @param price
	 * @param quatity
	 * @param discount
	 * @param subtotal
	 */
	public BillDetail(int id,int bill_id, String name,
			double price,int quatity,double discount,int subtotal){
		this.id = id;
		this.bill_id = bill_id;
		this.name = name;
		this.price = price;
		this.quatity = quatity;
		this.discount = discount;
		this.subtotal = subtotal;
	}
	
	/**
	 * use to insert into database;
	 * @param bill_id
	 * @param name
	 * @param price
	 * @param quatity
	 * @param discount
	 * @param subtotal
	 */
	public BillDetail(int bill_id, String name,
			double price,int quatity,double discount,double subtotal){
		this.bill_id = bill_id;
		this.name = name;
		this.price = price;
		this.quatity = quatity;
		this.discount = discount;
		this.subtotal = subtotal;
	}
	/**
	 * 
	 * @param name
	 * @param price
	 * @param quatity
	 * @param discount
	 * @param subtotal
	 */
	public BillDetail(String name,double price,int quatity,double discount,double subtotal){
		this.name = name;
		this.price = price;
		this.quatity = quatity;
		this.discount = discount;
		this.subtotal = subtotal;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the bill_id
	 */
	public int getBill_id() {
		return bill_id;
	}

	/**
	 * @param bill_id the bill_id to set
	 */
	public void setBill_id(int bill_id) {
		this.bill_id = bill_id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}

	/**
	 * @return the quatity
	 */
	public int getQuatity() {
		return quatity;
	}

	/**
	 * @param quatity the quatity to set
	 */
	public void setQuatity(int quatity) {
		this.quatity = quatity;
	}

	/**
	 * @return the discount
	 */
	public double getDiscount() {
		return discount;
	}

	/**
	 * @param discount the discount to set
	 */
	public void setDiscount(double discount) {
		this.discount = discount;
	}

	/**
	 * @return the subtotal
	 */
	public double getSubtotal() {
		return subtotal;
	}

	/**
	 * @param subtotal the subtotal to set
	 */
	public void setSubtotal(double subtotal) {
		this.subtotal = subtotal;
	}


	
}
